package cn.ckx.coding.common.exception;


/**
 * 业务异常
 * @author kunxin.cai
 */
public class BusinessException extends RuntimeException {

    private Integer code;

    private Object data;

    BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    BusinessException(Integer code, String message, Object data) {
        super(message);
        this.code = code;
        this.data = data;
    }

    BusinessException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public Object getData() {
        return data;
    }
}
